package com.ruoyi.biz.mapper;

import java.math.BigDecimal;
import java.util.List;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.ruoyi.biz.model.resp.BizInvoiceResp;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import com.ruoyi.biz.domain.BizInvoice;

/**
 * 项目开票Mapper接口
 * 
 * @author tianl
 * @date 2024-12-31
 */
@Mapper
public interface BizInvoiceMapper extends BaseMapper<BizInvoice> {
    IPage<BizInvoiceResp> list(IPage page, @Param("model") BizInvoice req);

    List<BizInvoiceResp> list(@Param("model") BizInvoice req);

    List<BizInvoiceResp> listByProjectIds(@Param("projectIds") List<Long> projectIds);
    BigDecimal moneyByProjectIds(@Param("projectIds") List<Long> projectIds);

    BizInvoiceResp selectDetail(Long id);
    
    /**
     * 按年份查询开票数据
     * 
     * @param year 年份
     * @return 开票数据列表
     */
    List<BizInvoiceResp> listByYear(@Param("year") Integer year);

    /**
     * 不开发票的项目
     * @return
     */
    List<Long> listInvalid();
}
